Initial hack

Still has some TODOs.