cleaning up module and starting to wirte tests