made factorial simple
Added a bunch of const qualifiers