Add some tests; divide class on module in a few files