minor bug fixes and added first pass at testing