Cleaned up cruft for tag
Better variables, simpler functions