Code formatted by astyle