fixes issue #2

also taken opportunity to restructure the repository