Cleaned up code
Added some conveniant methods