Non-random mode added; bugfixes