Non functioning code, with some design issues