Edit: fixed most compile errors

iwannadie