Clean up file structure

Applied OOP on item.php and gallery.php