Added commands, fixed bugs