Updated to include most phase 4 functionality