[WIP] More changes. Now compiles successfully.