added bluemix support + tidy up