Cleaned up compile logic a bit