Refactor tests

Originally I thought it would be a good idea to split testing to frontend and
backend. I don't like that idea anymore.