Add documentation, fix imports