Refactored to reduce API calls

Added local storage of ID's so that the amount of calls can be reduced,
allowing for quicker loads and less stress on the web server.