Moved error_msg; moved even more list operations