Added tests and fixed broken build script files