Fix singleton and add karma.conf file to run Karma independently