Fixed building and added unit testing as conditional