Bug fixes and adjusted heredoc screen output