Restructured code. Separated libraries and configs.