Fixed import error

Plus minor cleanup in galleries models and urls