added share buttons & hopefully optimized some code