Fixed bugs and added gg command