Clean up js files, add states html