Refactored and understood the proof of concept