Build & deployment improvements

Minor code cleanup

Update build lifecycle unit tests
Add more unit tests