Miscellaneous code compilation. Taken from school projects and homeworks.