added a few methods and some cleaning up