Again...cleaned up code