Added API integration with page2images, minor style update, added optional parameter