Some refctoring to use codeigniter input class