Added expansion detection, other changes

Version Pre-Alpha 0.5.9