refactor comp spec reader and setup for other components