Linux Build Fix + Code Cleanup