Improve tests and move everything to single module