Made some changes due to the libgdx framework