added bugsense

+ added bugsense
* cleaned up some code