Refactored the previous approach to move the logic
to the client side of the application.

[Fixes #52]