First public commit

Beta stage. Added background and fixed memory depletion bugs.