Changed name of budget constraint function
added documentation; minor changes in code