Fixed compile errors, need to redo command handling.