Added templates instead of inline html coding