Improve init command and unittest coverage of it