removed global variable, changed some method return and parameter types, removed div loops etc