Refactor or rewrite, there is no patching unmaintainable legacy code

CHECK OUT CODE ON GITHUB | 169.254.31.141