added couple simple tests and cleaned up code