Util codes written with javascript.