Code either wrote by myself or googled out for various purposes