Fix build process
Clean up code