Add support for selecting internal peer

Add animation support, also reflect some changes in the js file
structure
add internalapi stub