Xmas 2015 commit

Mostly signs and factors of 2, a few cross-checks and function made
simpler