cleared up code a little bit, some design changes