Fix several bug. Clear templates and helpers. Remove redundency. Online friend widget functional.