Initial source commit. Should be working now, at least the base
functions.