$resource and structuring application modules