Attempted code cleanup