Completed sum() functionality. Added input bar.