Configurable "cost" through dangling mass & indent

Added a cost component which can be configured in the conf file.
Leaving it default results in the behavior being unchanged.

I also ran everything through astyle --mode=java because my
editor indents differently than the rest of the project.
Sorry for the massive diff.