Cleaned code (almost only new line deletion)