Continued editing of the post, all code should be in code blocks