Major code fixing.