implements proper time getting
implements the paranoid pirate pattern
draft implementation of mdclientapi; some other modifications
creates init logic