Added some parsing to controller