Added max lines to commands, prepared for database version change