Reverted some code I ruthlessly removed even though its still being used