Refactor molecule snapshot code to support multiple molecules in future