Refactored teh codez.