Organized imports and fixed a few inconsistent function names