cleaning build system and adding tests