Clean up attribution code for vector layers