Added help and cleaned up some code