Cleaned up javascript.