Rewrote build files for clarity