Detailed comments and polished program