Refactored to create old create and upgrade files