Fixed imports and added more functionality