Tried to cleanup code, but broke it.