restructured code, added multiple files support
removed unused file