code cleanup
undo silly changes
updated test code