Updating the quiries to execute in context of respective company and updating code according to rails 4.0 commiting files which was not added after modification