Added 'Random' and 'Info' switch. Improved code style