Fixed issues in reporting + various cleanup