Moved common code into shared project