Tweaks + new main code

Started work on new main section (spintestV4). Currently under
development.