Improve documentation, remove unrequired code, some refactoring, god only knows what else