now with functional parsing of commands
fixed broken x command
added some comments