Changed code style, fixed indentation