Code refactoring (most changes in style)
Merge branch 'dev' of https://github.com/kireal/KDCS into dev