Cleaned up the code, removed unused javascript.