Wrote some tests. Fixed some methods