Code clean-up, removed some old code. Little patches here and there.