Remove unneccessary stuff and add tests