Solved keyboard bugs
Restructured the source code