Replaced QR code generation with an angular directive. Introduced a new controller for displaying QRcodes and thus having teacher side code completely under control of angular.