Cleaned up code after reverting.