Activity graph stuff and some major bugfixes