minor bug fixes

also copied bug sense framework

need to reupload on monday