Added code to calculate initial states in a smaller basis