added power button, fixed bugs