moving html formatting/parsing logic to own classes