Structurized imports and fixed some minor issues.