Fix compile errors, remove redundant method