Created a Javascript base implementation