Adds missing imports and minor stylistic changes