Bunch of CodeIgniter fixes.

Signed-off-by: Ben Corlett <bencorlett@me.com>