Initial version before working on making the app multi-threaded