Reworking of code to handle checking, updating and initialising separately; add proper error/success handling