Cleanup

- build logic update
- minor code cleanup