Move to() function back so that JS part is not confused by Serializable
Fix "return return" typo
Fix JS tests