Application logic implemented. Tests to be added.