Refactoring in DB plugin

- Move BoneCP related code in a separate file
- Import cleanup
- Source formatting