clean up main method

Removed some repeating code. Also changed previously embarassing usage
message to a correct one and added -h flag for more information.