minor: cleans up imports, generics and some formatting