Almost complete, at least the first version of this application