File separation and improvements (unusable version)
Added callbacks, bug fixing (unusable version)