Sample code import & conversion
initial commit.
API requests succeeding, config page broken / cache & apikey variables not set.