Removed Magic Numbers and Refactureing

as stated above
Revert "Removed Magic Numbers and Refactureing"

This reverts commit 03e7d2bfb2b5358c76079ebc3892fde463d1f237.