improved error handling and output, make cycle's working. Pending templates