Code cleanup

Code was badly misaligned and needed to implement the proper use of
constants.