Cleaned up a bit and began working with -p/--page
Cleaned up code