Fixed minor bugs and grunt file