Sorted out inheritance / prototype chain and added noise generator.