Fixed some stuff, like return values and const