Rewrite code architecture and main classes, slider's preview nearly working