Clean up local imports and add some annotations for #2