Cleanuped code.