Major code rework, bug fixes and features

Added possibility to Cut, Copy, Paste and Select in address bar + fixed
behavior. Reworked the code into separate files.