Improved coding and readability

Thanks VSE