Refactored hoempage to use json magic