Refactor for easier constuction and update.