reformatted code
added some interfaces for extensions
fixed npe
Merge twidere update