Cleaned up code

Added helper function for associated ID retrieval (zappoint/tag).