Big refactor. New init method. Some more tests