moved js into core app