cleaned up code
merged branches