refactor - reduce CTFE memory consumption pt 1

Currently, CTFE allocates memory for every step in its computation. This can result in an enormous amount allocated. This is the first step towards using stack memory instead.
I suspected that using templates would make it even harder for @yebblies 

Anyhow, I don't know what would work for @yebblies , so I'm open to suggestion from him.