hlint and warnings fixes