Refactored build, automated testing setup