Renamed scripts, added tests, refactored stuff