Made Functional

I fixed the compile errors, and added some more feedback.
It now works correctly.