fixed some issues, refactored some things, and improved help messages