Re-organise the layout of the Wallet file and introduce IntelliJ compatible editor regions, so parts of the code can be folded by feature area. This also makes it easier to understand what exactly the wallet does and why it's so huge.