Added galleries and cleaned up code