Added some js design patterns and messed around with bdd tests