cleaned code up
class-ification and improved file naming