Added code and readability to enhanced prototype