Code finalized

* Modified lookup input columns
* Fixed bugs