Commented code to explain and learn each componet