Use resource instead of
Clean up the angular a bit