Fully functional code.