Cleaned up React code and fixed ejs partial issue