Reorganized power_method and userInputP

Accuracy unknown, need to work on edge cases.