moved things around to make source readable, added comments, changed init method...