Added Input Handler plus some bug fixes.