Cleaned up more code and added more control commands