Fix not working, and refactor

:(
Line is too long. [125/80]