Mostly working, have to add a couple commands and debug