Tidy up some of the literal optimizations

Signed-off-by: Rick Taylor <rick@tropicalstormsoftware.com>
Some constant folding of if/while

Signed-off-by: Rick Taylor <rick@tropicalstormsoftware.com>
Small tidy up

Signed-off-by: Rick Taylor <rick@tropicalstormsoftware.com>
Tidy up and start of branch support

Signed-off-by: Rick Taylor <rick@tropicalstormsoftware.com>