PreBeta commit

squashed many bugs