Updated Budget.php and Flock.php
Also reorganized some code.