Working by category calculations

Previous month calculations, correct date querying, method scopes