build cleanup and tests