Fixed some bugs, renamed to test