Change project layout and repare tests