Refactored build system for using shared objects.